package com.zichuan;

import com.zichuan.server.MessageServer;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.Resource;

@SpringBootApplication
public class SpringbootApplication implements ApplicationRunner {
    public static void main(String[] args) {
        SpringApplication.run(SpringbootApplication.class, args);
    }

    @Resource
    MessageServer messageServer;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        messageServer.sendMessage();
    }
}
